{% extends "generic/object_detail.html" %}
{% load helpers %}

{% block content_left_page %}
    <div class="panel panel-default">
        <div class="panel-heading">
            <strong>Secrets Group</strong>
        </div>
        <table class="table table-hover panel-body attr-table">
            <tr>
                <td>Description</td>
                <td colspan="3">{{ object.description | placeholder }}</td>
            </tr>
            <tr>
                <td rowspan="{{ secrets_group_associations | length | add:'1'}}">Secrets</td>
                <th>Access Type</th>
                <th>Secret Type</th>
                <th>Secret</th>
            </tr>
            {% for secret_association in secrets_group_associations %}
                <tr>
                    <td>{{ secret_association.access_type }}</td>
                    <td>{{ secret_association.secret_type | bettertitle }}</td>
                    <td>
                        <a href="{{ secret_association.secret.get_absolute_url }}">{{ secret_association.secret }}</a>
                    </td>
                </tr>
            {% endfor %}
        </table>
    </div>
{% endblock content_left_page %}
